// 包装打印记录相关API
import request from '@/utils/request'

// 包装打印记录相关API
export const packPrintRecordApi = {
  // 获取包装打印记录分页
  getPackPrintRecordPage(params) {
    return request({
      url: '/wm/pack-print-record/page',
      method: 'get',
      params
    })
  },

  // 获取包装打印记录分页（缴库专用）
  getPackPrintRecordPageByZzp(params) {
    return request({
      url: '/wm/pack-print-record/page-by-zzp',
      method: 'get',
      params
    })
  },

  // 批量创建入库记录并更新实时库存
  createPackPrintRecordBatch(data) {
    return request({
      url: '/wm/pack-print-record/create-batch',
      method: 'post',
      data
    })
  },

  // 获取包装打印记录详情
  getPackPrintRecord(id) {
    return request({
      url: `/wm/pack-print-record/get?id=${id}`,
      method: 'get'
    })
  },

  // 创建包装打印记录
  createPackPrintRecord(data) {
    return request({
      url: '/wm/pack-print-record/create',
      method: 'post',
      data
    })
  },

  // 更新包装打印记录
  updatePackPrintRecord(data) {
    return request({
      url: '/wm/pack-print-record/update',
      method: 'put',
      data
    })
  },

  // 删除包装打印记录
  deletePackPrintRecord(id) {
    return request({
      url: `/wm/pack-print-record/delete?id=${id}`,
      method: 'delete'
    })
  }
}

export default packPrintRecordApi
